//
//  BVWorkoutDetailNormalTableViewCell.m
//  AFNetworking
//
//  Created by xiute on 2019/10/31.
//

#import "BVWorkoutDetailNormalTableViewCell.h"
#import "UIImageView+BVWebCache.h"

@interface BVWorkoutDetailNormalTableViewCell ()

@property (weak, nonatomic) IBOutlet UIView *firstContainerView;
@property (weak, nonatomic) IBOutlet UIView *secondcontainerView;


@end

@implementation BVWorkoutDetailNormalTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    self.backgroundColor = [UIColor whiteColor];
    self.backgroundColor = [UIColor whiteColor];
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    
    self.firstImageView.layer.cornerRadius = 11;
    self.firstImageView.clipsToBounds = YES;
    
    self.secondImageView.layer.cornerRadius = 11;
    self.secondImageView.clipsToBounds = YES;
    
}
- (IBAction)firstButtonAct:(id)sender {
    self.firstBlock?self.firstBlock():nil;
}
- (IBAction)secondButtonAct:(id)sender {
    self.secondBlock?self.secondBlock():nil;
}

- (void)configWithModel:(NSArray<BVMetaModel *> *)model {
    [self.firstImageView bv_imageWithUrl:model.firstObject.cover];
    if (model.count > 1) {
        [self.secondImageView bv_imageWithUrl:model.lastObject.cover];
    }
}

+ (CGFloat)cellHeight {
    CGFloat cellHeight = ((kSCREEN_WIDTH - 24 - 24 - 17) / 2.0) * (87.0 / 155.0) + 15;
    return cellHeight;
}

@end
